<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="vue.js"></script>
</head>
<body>
    <div id="demo">
        <template v-if="login">欢迎来到这里学习</template>
        <template v-else="login">请登录</template>
    </div>

    <script>
        var app=new Vue({
            el:'#demo',
            data:{
                login:true
            }
        });
    </script>
</body>
</html>